#include "Spi_Dev_Management/Spi_Dev_Factory.h"
#include "Spi_Dev_M55.h"
#include "Spi_Dev_Stub.h"
#include "Spi_Dev_X3.h"

std::unique_ptr<ISpi_Dev> Spi_Dev_Factory::create_spi_dev(const Spi_Dev_Platform& platfrom, const std::string& node)
{
    switch(platfrom)
    {
        case Spi_Dev_Platform::M55: return std::make_unique<Spi_Dev_M55>(node);
        case Spi_Dev_Platform::Stub: return std::make_unique<Spi_Dev_Stub>(node);
        case Spi_Dev_Platform::X3: return std::make_unique<Spi_Dev_X3>(node);
        default: return nullptr;
    }
}